home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / MarkzScout™ 14-day trial / Scripts / File Info.m1s < prev    next >
Encoding:
Text File  |  1999-04-05  |  1.7 KB  |  73 lines  |  [TEXT/MSCT]

  1. //
  2. // File Info.M1S
  3. //
  4. month[1] = "Jan"
  5. month[2] = "Feb"
  6. month[3] = "Mar"
  7. month[4] = "Apr"
  8. month[5] = "May"
  9. month[6] = "Jun"
  10. month[7] = "Jul"
  11. month[8] = "Aug"
  12. month[9] = "Sep"
  13. month[10] = "Oct"
  14. month[11] = "Nov"
  15. month[12] = "Dec"
  16.  
  17. proc ProcessFile
  18. print "Document         : " + it.name
  19. print "File Type        : " + it.class_name 
  20. if it.platform is defined then
  21.   print "Platform         : " + it.platform
  22. end if
  23. if it.creator is defined then
  24.   print "Creator          : " + it.creator
  25. end if
  26. if it.version is defined then
  27.   print "Version          : " + it.version
  28. end if
  29. if it.orientation is defined then
  30.   print "Orientation      : " + it.orientation
  31. end if
  32. if it.creationdate is defined then
  33.   if it.creationdate <> "" then
  34.     monthNum = val(mid(it.creationdate,5,2))
  35.     if monthNum >= 1 and monthNum <= 12 then
  36.       d =
  37.        mid(it.creationdate,7,2) 
  38.         + "-" + month[monthNum] 
  39.         + "-" + left(it.creationdate,4)
  40.     else
  41.       d = it.creationdate
  42.     end if
  43.     print "Creation date    : " + d
  44.   end if
  45. end if
  46. if it.modificationdate is defined then
  47.   if it.modificationdate <> "" then
  48.     d =
  49.      mid(it.modificationdate ,7,2) 
  50.      + "-" + month[val(mid(it.modificationdate ,5,2))]
  51.      + "-" + left(it.modificationdate ,4)
  52.     print "Modification date: " + d
  53.   end if
  54. end if
  55. if it.width is defined then
  56.   print "Width (inch)     : " + it.width
  57. end if
  58. if it.height is defined then
  59.   print "Height (inch)    : " + it.height
  60. end if
  61. if it.yres is defined then
  62.   print "Resolution (dpi) : " + it.yres
  63. end if
  64. if it.pagesize_name is defined then
  65.   print "Page Size        : " + it.pagesize_name
  66. end if
  67. print "-------------------------------------------------------"
  68. end proc
  69.  
  70. theJob = it
  71.  
  72. on file do ProcessFile
  73. scan theJob links uses